﻿<navigation:Page x:Class="GranitePackageSystem.Views.Request.RequestSummary" 
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           mc:Ignorable="d"
           xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
           xmlns:controlsToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"
           xmlns:layoutToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Layout.Toolkit"
           xmlns:GranitePackageSystem_FileUploader="clr-namespace:GranitePackageSystem.FileUploader"
           xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
           d:DesignWidth="1024" d:DesignHeight="1800" MaxWidth="1024"
           Title="RequestSummary Page">
    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="10" />
            <RowDefinition Height="333*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="250" />
            <ColumnDefinition Width="550*" />
        </Grid.ColumnDefinitions>
        <StackPanel Grid.Row="0" Grid.ColumnSpan="2" Margin="10" Name="panelTitle">
            <TextBlock Text="Request Summary" Name="txtHeader"  FontSize="18" FontWeight="Bold" HorizontalAlignment="Center" />
        </StackPanel>
        <StackPanel Grid.Row="1" Name="panelLandingNav" Margin="10,10,10,0" Background="#FF484848" Height="Auto" VerticalAlignment="Top" Width="200" HorizontalAlignment="Center">
            <HyperlinkButton x:Name="linkHome" NavigateUri="/Home" TargetName="ContentFrame" Content="Dashboard" Style="{StaticResource LinkStyle}" Background="{x:Null}" AllowDrop="True" HorizontalContentAlignment="Left" Margin="16,0,0,0"/>
            <controlsToolkit:Expander ExpandDirection="Down" Name="expanderRequest" Visibility="Visible" IsExpanded="True">
                <controlsToolkit:Expander.Header>
                    <TextBlock Text="Current Request" FontSize="12" Foreground="White" TextAlignment="Left" Name="expanderHeader" />
                </controlsToolkit:Expander.Header>
                <controlsToolkit:Expander.Content>
                    <StackPanel HorizontalAlignment="Right" Margin="30,0,0,0" Width="AUTO">
                        <HyperlinkButton x:Name="linkTestingDetails" NavigateUri="/Request/TestingDetails" TargetName="ContentFrame" Content="• Testing Environment" Margin="0,0,5,0" Style="{StaticResource LinkStyle}" HorizontalContentAlignment="Left" Visibility="Visible" />
                        <HyperlinkButton x:Name="linkPackageDetails" NavigateUri="/Request/PackageDetails" TargetName="ContentFrame" Content="• Package Details" Margin="0,0,5,0" Style="{StaticResource LinkStyle}" HorizontalContentAlignment="Left" Visibility="Visible" />
                        <HyperlinkButton x:Name="linkLicensingDetails" NavigateUri="/Request/Licensing" TargetName="ContentFrame" Content="• Licensing Details" Margin="0,0,5,0" Style="{StaticResource LinkStyle}" HorizontalContentAlignment="Left" Visibility="Visible" />
                        <HyperlinkButton x:Name="linkSummaryDetails" NavigateUri="/Request/RequestSummary" TargetName="ContentFrame" Content="• Request Summary" Margin="0,0,5,0" Style="{StaticResource LinkStyle}" HorizontalContentAlignment="Left" Visibility="Visible" Foreground="#FF42A1F5"  />
                    </StackPanel>
                </controlsToolkit:Expander.Content>
            </controlsToolkit:Expander>
        </StackPanel>
        <controlsToolkit:BusyIndicator Name="busyIndicatorMain" IsBusy="False" Grid.Row="1" Grid.Column="1">
            <StackPanel Name="panelContent">
                <Image Name="image" Source="/GranitePackageSystem;component/Assets/Resources/Summary.png" />
                <StackPanel Name="panelPackageInformationHeader" Margin="10" Orientation="Horizontal" HorizontalAlignment="Center">
                    <TextBlock Text="Package Data" VerticalAlignment="Center" FontWeight="Bold" />
                </StackPanel>
                <StackPanel Name="panelPackageInformation" Orientation="Horizontal">
                    <StackPanel Width="200">
                        <TextBlock Text="Package Name:  "  Height="20" Margin="2,5,2,2" />
                        <TextBlock Text="Package Publisher:  " Height="20" Margin="2,5,2,2" />
                        <TextBlock Text="Package Version:  "  Height="20" Margin="2,5,2,2" />
                        <TextBlock Text="Package Source Files Location:  " Height="20" Margin="2,5,2,2" />
                        <TextBlock Text="Package Source File Hash Value:  " Height="20" Margin="2,5,2,2" />
                        <TextBlock Text="Package Size (MB):  " Height="20" Margin="2,5,2,2" />
                        <TextBlock Text="Package Comments:  " Height="20" Margin="2,5,2,2" />
                    </StackPanel>
                    <StackPanel Width="560" Name="panelPackageInfoDetails">
                        <TextBox Name="boxPackageName" Text="{Binding Name}" Height="23" Margin="2" IsEnabled="False"/>
                        <TextBox Name="boxPackagePublisher" Text="{Binding Publisher}" Height="23" Margin="2" IsEnabled="False" />
                        <TextBox Name="boxPackageVersion" Text="{Binding Version}" Height="23" Margin="2" IsEnabled="False" />
                        <TextBox Name="boxPackageSourceFileLocation" Text="{Binding SourceFileLocation}" Height="23" Margin="2" IsEnabled="False" />
                        <TextBox Name="boxPackageSourceFileHash" Text="{Binding SourceFileHash}" Height="23" Margin="2" IsEnabled="False" />
                        <TextBox Name="boxPackageSize" Text="{Binding PackageSize_MB}" Height="23" Margin="2" IsEnabled="False" />
                        <TextBox Name="boxPackageComments" Text="{Binding Comment}" Height="23" Margin="2" IsEnabled="False" />
                    </StackPanel>
                </StackPanel>
                <StackPanel Orientation="Horizontal" Name="panelProgramInformation">
                    <StackPanel Width="200">
                        <TextBlock Text="Program Install String:  " Height="20" Margin="2,5,2,2" />
                        <TextBlock Text="Program Uninstall String:  "  Height="20" Margin="2,5,2,2" />
                    </StackPanel>
                    <StackPanel Width="560" Name="panelProgramInfoDetails">
                        <TextBox Name="boxProgramInstallString" Text="{Binding CommandLine}" Height="23" Margin="2" IsEnabled="False" />
                        <TextBox Name="boxProgramUninstallString" Text="{Binding uninstallString}" Height="23" Margin="2" IsEnabled="False" />
                    </StackPanel>
                </StackPanel>
                <TextBlock Text="Work Log" Margin="5,20,0,0" FontWeight="Bold" />
                <sdk:DataGrid Name="gridWorkLog" Height="120" HorizontalAlignment="Left" Margin="5" AutoGenerateColumns="False" MouseLeftButtonUp="gridWorkLog_MouseLeftButtonUp">
                    <sdk:DataGrid.Columns>
                        <sdk:DataGridTextColumn Binding="{Binding UserName}" Header="User Name" IsReadOnly="True" Width="1*" />
                        <sdk:DataGridTextColumn Binding="{Binding NoteDate}" Header="Date" IsReadOnly="True" Width="1*" />
                        <sdk:DataGridTextColumn Binding="{Binding displayLine}" Header="Note" IsReadOnly="True" Width="2*" />
                    </sdk:DataGrid.Columns>
                </sdk:DataGrid>
                <Button Name="btnAddWorklogEntry" Content="Add Worklog Entry" HorizontalAlignment="Right" Margin="5" Width="130" Click="btnAddWorklogEntry_Click" />
                <StackPanel Name="panelLicensingContent">
                    <StackPanel Name="panelLicenseHeader" Margin="10" Orientation="Horizontal" HorizontalAlignment="Center">
                        <TextBlock Text="Licensing Data" VerticalAlignment="Center" FontWeight="Bold" />
                    </StackPanel>
                    <StackPanel Name="panelMainSoftwareOrigin">
                        <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Margin="10">
                            <TextBlock Text="Software Origin:" Width="180" />
                            <Button Name="btnHelpSoftwareOrigin" Content="?" Height="20" Margin="0,0,20,0" />
                            <ComboBox SelectedIndex="0" Name="boxSoftwareOrigin" Width="220">
                                <ComboBoxItem Content="Not General Mills Developed" />
                                <ComboBoxItem Content="General Mills Developed" />
                            </ComboBox>
                        </StackPanel>
                        <StackPanel Name="panelSubSoftwareOrigin">
                            <StackPanel Orientation="Horizontal" Name="panelProcurementMethod" Margin="10,0,0,10">
                                <TextBlock Text="Software Procurement Method" Width="180" VerticalAlignment="Center" />
                                <Button Name="btnHelpSoftwareProcurementMethod" Content="?" Height="20" Margin="0,0,20,0" VerticalAlignment="Center" />
                                <ComboBox Name="boxSoftwareProcurementMethod" SelectedIndex="0" Width="220">
                                    <ComboBoxItem Content="SAP SRM request" />
                                    <ComboBoxItem Content="Maximo Request" />
                                    <ComboBoxItem Content="Corporate Credit Card" />
                                    <ComboBoxItem Content="Personal Credit Card" />
                                    <ComboBoxItem Content="No Cost" />
                                </ComboBox>
                            </StackPanel>
                            <StackPanel Orientation="Horizontal" Name="panelSoftwareCost" Margin="10,0,0,10">
                                <TextBlock Text="Software Cost" Width="180" VerticalAlignment="Center" />
                                <Button Name="btnHelpSoftwareCost" Content="?" Height="20" Margin="0,0,20,0" VerticalAlignment="Center" />
                                <ComboBox Name="boxSoftwareCost" Width="220" SelectedIndex="1">
                                    <ComboBoxItem Content="0-$1,000" />
                                    <ComboBoxItem Content="1,000-$10,000" />
                                    <ComboBoxItem Content="$10,000+" />
                                </ComboBox>
                            </StackPanel>
                            <StackPanel Orientation="Horizontal" Name="panelPONumber" Margin="10,0,0,10">
                                <TextBlock Text="PO Number" Width="180" VerticalAlignment="Center" />
                                <Button Name="btnHelpPONumber" Content="?" Height="20" Margin="0,0,20,0" VerticalAlignment="Center" />
                                <TextBox Name="boxPONumber" Width="220" />
                            </StackPanel>
                            <StackPanel Orientation="Horizontal" Margin="10,0,0,10" Height="25">
                                <TextBlock Text="Is this Software Contracted" VerticalAlignment="Center" Width="180" />
                                <Button Name="btnHelpSoftwareContracted" Content="?" Height="20" />
                                <StackPanel Name="panelButtonBar_SoftwareContracted" Orientation="Horizontal" Margin="20,0,0,0">
                                    <Border BorderBrush="DarkGray" Name="btnSoftwareContracted_YES" BorderThickness="1.5">
                                        <TextBlock Text="Yes" Width="50" TextAlignment="Center" VerticalAlignment="Center" />
                                    </Border>
                                    <Border BorderBrush="DarkGray" Name="btnSoftwareContracted_NO" BorderThickness="1.5" Background="#FF95BCF2">
                                        <TextBlock Text="No"  Width="50" TextAlignment="Center" VerticalAlignment="Center" />
                                    </Border>
                                </StackPanel>
                            </StackPanel>
                            <StackPanel Name="panelSoftwareEULA" Orientation="Horizontal" Margin="10,0,10,0">
                                <TextBlock Text="Software EULA" Width="180" VerticalAlignment="Top" />
                                <Button Name="btnHelpSoftwareEULA" Content="?" Height="20" Margin="0,0,20,0" VerticalAlignment="Top" />
                                <RichTextBox Name="boxSoftwareEULA" Height="300" Width="540" />
                            </StackPanel>
                            <StackPanel Name="panelLicenseKey" Orientation="Horizontal" Margin="10">
                                <TextBlock Text="License Key(s)" Width="180" VerticalAlignment="Center" />
                                <Button Name="btnHelpLicenseKeys" Content="?" Height="20" Margin="0,0,20,0" VerticalAlignment="Center" />
                                <ComboBox Name="boxLicenseKeyChoice" SelectedIndex="2" Width="220">
                                    <ComboBoxItem Content="Group License Key" />
                                    <ComboBoxItem Content="Unique Individual License Key(s)" />
                                    <ComboBoxItem Content="No License Key" />
                                </ComboBox>
                            </StackPanel>
                            <StackPanel Name="panelLicenseKeyUploader" Orientation="Vertical" Margin="80,10,10,10" Width="400" Visibility="Collapsed">
                                <ListBox Name="listBoxLicenseKeys" Height="200" Width="400" />
                            </StackPanel>
                        </StackPanel>
                        <controlsToolkit:BusyIndicator Name="busyIndicatorSoftwareOwnership">
                            <StackPanel Name="panelSoftwareOwnership">
                                <StackPanel Orientation="Horizontal" Name="panelDivisionOfOwnership" Margin="10,0,0,10">
                                    <TextBlock Text="Division of Ownership" Width="180" VerticalAlignment="Center" />
                                    <Button Name="btnHelpDivisonOfOwnership" Content="?" Height="20" Margin="0,0,20,0" VerticalAlignment="Center" />
                                    <ComboBox Name="boxDivisonOfOwnership" Width="220" SelectionChanged="boxDivisonOfOwnership_SelectionChanged">
                                        <ComboBox.ItemTemplate>
                                            <DataTemplate>
                                                <TextBlock Text="{Binding Name}" />
                                            </DataTemplate>
                                        </ComboBox.ItemTemplate>
                                    </ComboBox>
                                </StackPanel>
                                <StackPanel Orientation="Horizontal" Name="panelDepartmentOfOwnership" Margin="10,0,0,10">
                                    <TextBlock Text="Department of Ownership" Width="180" VerticalAlignment="Center" />
                                    <Button Name="btnHelpDepartmentOfOwnership" Content="?" Height="20" Margin="0,0,20,0" VerticalAlignment="Center" />
                                    <ComboBox Name="boxDepartmentOfOwnership" Width="220" ItemsSource="{Binding SelectedItem.Departments, ElementName=boxDivisonOfOwnership}">
                                        <ComboBox.ItemTemplate>
                                            <DataTemplate>
                                                <TextBlock Text="{Binding name}" />
                                            </DataTemplate>
                                        </ComboBox.ItemTemplate>
                                    </ComboBox>
                                </StackPanel>
                            </StackPanel>
                        </controlsToolkit:BusyIndicator>
                    </StackPanel>
                </StackPanel>
            <Button HorizontalAlignment="Right" Name="btnSubmitRequest" Content="Submit Request" Click="btnSubmitRequest_Click" />
            </StackPanel>
        </controlsToolkit:BusyIndicator>
    </Grid>
</navigation:Page>